<html>
  <head>
    <title>iframe</title>
    <meta charset="utf-8" />
    <style>
      iframe {
        width: 100%;
        height: 100%;
      }
    </style>
  </head>

  <body>
    <iframe id="iframe"> </iframe>
    <script lang="javascript">
      document.getElementById('iframe').src=`http://localhost:8300`
	  window.addEventListener('message',function(){
		  alert(1111)
	  })
   //    window.addEventListener("message", async (e) => {
		 //  console.log('message')
   //      switch (e.data?.type) {
   //          case 'deviceSelected':
   //              alert(`选中设备:${e.data.deviceInfo.no}`);
   //              break;
   //          default:
			// console.log('11111')
   //              break;
   //      }
   //    });

      function isSupportTouch(){
        return "ontouchend" in document ? true : false;
      }
      // alert(`isSupportTouch:${isSupportTouch()}`)
    </script>
  </body>
</html>
